[codex] Add OpenClaw security roadmap article - #141
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This reverts commit b4b3cc5.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4df6c62bfb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const url = author.url ?? (author.handle ? `https://x.com/${author.handle}` : null); | ||
| if (!url) return []; | ||
| return [{ | ||
| label: author.handle ? `@${author.handle}` : new URL(url).hostname.replace(/^www\./, ''), |
There was a problem hiding this comment.
Guard author URL parsing before deriving link labels
getAuthorLinks calls new URL(url) when an author has url but no handle; if authorUrl/links.url is a relative path or any malformed string, this throws TypeError during Astro render and can fail the blog page/build. Since src/content.config.ts currently accepts any string for these fields, a typo or internal-relative author URL is enough to trigger a hard failure instead of gracefully omitting/formatting the label.
Useful? React with 👍 / 👎.
| return [{ | ||
| label: author.handle ? `@${author.handle}` : new URL(url).hostname.replace(/^www\./, ''), |
There was a problem hiding this comment.
| return [{ | |
| label: author.handle ? `@${author.handle}` : new URL(url).hostname.replace(/^www\./, ''), | |
| let label: string; | |
| if (author.handle) { | |
| label = `@${author.handle}`; | |
| } else { | |
| // Try to extract hostname from URL, fall back to URL string if invalid | |
| try { | |
| label = new URL(url).hostname.replace(/^www\./, ''); | |
| } catch { | |
| // If URL is invalid, use the URL string itself as label | |
| label = url; | |
| } | |
| } | |
| return [{ | |
| label, |
Missing error handling in getAuthorLinks function causes runtime TypeError when author.url is not a valid URL string
Summary
Validation
bun run buildhttp://127.0.0.1:4321/blog/where-openclaw-security-is-heading/